import 'bootstrap/dist/css/bootstrap.css';
import '../css/index2.scss';

require('bootstrap/dist/js/bootstrap.js');
require('./common.js');
$('#sidebar-menu a[href="choose_list.html"]').addClass('active')
$('#sidebar-menu a[href="choose_list.html"]').parent('li').addClass('active');
import { websiteLatestUrl} from './urlconfig/config.js';
function getSelectOption() {
	$.ajax({
		url: websiteLatestUrl,
		type: 'get',
		dataType:"json",
		success: function(res) {
			if(res.status === 1) {
				res.data.items.forEach(v => {
					let option = $("<option></option>");
					option.text(v.name).val(v.name).appendTo($("#select-list"))
				})
			}else {

			}
		},
		error: function() {

		}
	})
}
getSelectOption();

let web_name;
$("#select-list").on('change', () => {
	web_name = $('#select-list option:selected').val();

	let name = $('#select-list option:selected').text();
	window.location.href = "website_list.html?web_name=" + web_name;
	// $(".page-title").html(name + '关键词数量统计')
	// $(".select").hide();
	
	// $(".content-page").css({'height': 'auto'});
	// reqOption.data.website_id =  web_id;
	// dirctData.website_id = web_id;
	// getData(reqOption, formatResData, true);
	// getDirct();
	// createDirct();
})
